package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchPumpGroupsMapper;
import com.ruoyi.system.domain.DispatchPumpGroups;
import com.ruoyi.system.service.IDispatchPumpGroupsService;

/**
 * 泵组信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchPumpGroupsServiceImpl implements IDispatchPumpGroupsService 
{
    @Autowired
    private DispatchPumpGroupsMapper dispatchPumpGroupsMapper;

    /**
     * 查询泵组信息
     * 
     * @param pumpGroupId 泵组信息主键
     * @return 泵组信息
     */
    @Override
    public DispatchPumpGroups selectDispatchPumpGroupsByPumpGroupId(Long pumpGroupId)
    {
        return dispatchPumpGroupsMapper.selectDispatchPumpGroupsByPumpGroupId(pumpGroupId);
    }

    /**
     * 查询泵组信息列表
     * 
     * @param dispatchPumpGroups 泵组信息
     * @return 泵组信息
     */
    @Override
    public List<DispatchPumpGroups> selectDispatchPumpGroupsList(DispatchPumpGroups dispatchPumpGroups)
    {
        return dispatchPumpGroupsMapper.selectDispatchPumpGroupsList(dispatchPumpGroups);
    }

    /**
     * 新增泵组信息
     * 
     * @param dispatchPumpGroups 泵组信息
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchPumpGroups(DispatchPumpGroups dispatchPumpGroups)
    {
        return dispatchPumpGroupsMapper.insertDispatchPumpGroups(dispatchPumpGroups);
    }

    /**
     * 修改泵组信息
     * 
     * @param dispatchPumpGroups 泵组信息
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchPumpGroups(DispatchPumpGroups dispatchPumpGroups)
    {
        return dispatchPumpGroupsMapper.updateDispatchPumpGroups(dispatchPumpGroups);
    }

    /**
     * 批量删除泵组信息
     * 
     * @param pumpGroupIds 需要删除的泵组信息主键
     * @return 结果
     */
    @Override
    public int deleteDispatchPumpGroupsByPumpGroupIds(Long[] pumpGroupIds)
    {
        return dispatchPumpGroupsMapper.deleteDispatchPumpGroupsByPumpGroupIds(pumpGroupIds);
    }

    /**
     * 删除泵组信息信息
     * 
     * @param pumpGroupId 泵组信息主键
     * @return 结果
     */
    @Override
    public int deleteDispatchPumpGroupsByPumpGroupId(Long pumpGroupId)
    {
        return dispatchPumpGroupsMapper.deleteDispatchPumpGroupsByPumpGroupId(pumpGroupId);
    }
}
